﻿using Ross.OA.Entities;
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace Ross.OA.EntityFramework.Model
{
    [Table("PODetails")]
    public class PODetails : Entity<Guid>
    {
        /// <summary>
        /// 采购单号
        /// </summary>
        [Required, MaxLength(50)]
        public string order_code { get; set; }
        /// <summary>
        /// 采购行号
        /// </summary>
        [Required, MaxLength(8)]
        public string order_line { get; set; }
        /// <summary>
        /// 工厂代码
        /// </summary>
        [Required, MaxLength(50)]
        public string factory_code { get; set; }
        /// <summary>
        /// 工厂名称
        /// </summary>
        [MaxLength(50)]
        public string factory_name { get; set; }
        /// <summary>
        /// 物料代码
        /// </summary>
        [Required, MaxLength(50)]
        public string fits_code { get; set; }
        /// <summary>
        /// 物料名称
        /// </summary>
        [Required, MaxLength(200)]
        public string fits_name { get; set; }
        /// <summary>
        /// 交货日期
        /// </summary>
        public DateTime delivery_date { get; set; }
        /// <summary>
        /// 采购数量
        /// </summary>
        public float item_num { get; set; }
        /// <summary>
        /// 采购单位代码
        /// </summary>
        [MaxLength(50)]
        public string unit_code { get; set; }
        /// <summary>
        /// 采购单位描述
        /// </summary>
        [MaxLength(50)]
        public string unit_name { get; set; }
        /// <summary>
        /// 后期组代码
        /// </summary>
        [MaxLength(50)]
        public string logistics_gcode { get; set; }
        /// <summary>
        /// 后期组描述
        /// </summary>
        [MaxLength(50)]
        public string logistics_gname { get; set; }
        /// <summary>
        /// 交货地点代码
        /// </summary>
        [MaxLength(50)]
        public string inventory_code { get; set; }
        /// <summary>
        /// 交货地点描述
        /// </summary>
        [MaxLength(50)]
        public string inventory_name { get; set; }
        /// <summary>
        /// 信息记录号
        /// </summary>
        [MaxLength(50)]
        public string buy_item_code { get; set; }
        /// <summary>
        /// 采购类型代码
        /// </summary>
        [MaxLength(50)]
        public string buy_item_type { get; set; }
        /// <summary>
        /// 采购类型描述
        /// </summary>
        [MaxLength(50)]
        public string buy_item_type_name { get; set; }
        /// <summary>
        /// 结算税代码
        /// </summary>
        [MaxLength(50)]
        public string tax_rate_code { get; set; }
        /// <summary>
        /// 是否退货
        /// </summary>
        public bool item_is_return { get; set; }
        /// <summary>
        /// 是否删除代码	107302100:正常	107302200:已作废
        /// </summary>
        public int item_obsolete { get; set; }
        /// <summary>
        /// 是否删除描述
        /// </summary>
        [MaxLength(50)]
        public string item_obsolete_name { get; set; }
        /// <summary>
        /// 发货状态代码	107303100:未发货	107303110:发货中	107303120:已发货	107303200:已收货
        /// </summary>
        public int item_delivered { get; set; }
        /// <summary>
        /// 发货状态描述
        /// </summary>
        [MaxLength(50)]
        public string item_delivered_name { get; set; }
        /// <summary>
        /// 明细状态代码	107304100:未入库	107304200:已入库
        /// </summary>
        public int item_status { get; set; }
        /// <summary>
        /// 明细状态描述
        /// </summary>
        [MaxLength(50)]
        public string item_status_name { get; set; }
        /// <summary>
        /// 明细备注
        /// </summary>
        [MaxLength(500)]
        public string item_memo { get; set; }
    }
}
